<template>
  <div id="app">
  <van-tabbar v-model="active" route v-if="!$route.meta.ishide">
    <van-tabbar-item v-for="item in menu" :key="item.id"  :icon="item.icon" :to="item.path">{{ item.title }}</van-tabbar-item>
   
  </van-tabbar>
  </div>
</template>


<script>
import Vue from 'vue';
import { Button,Icon,Tabbar, TabbarItem  } from 'vant';
Vue.use(Button);
Vue.use(Icon);
Vue.use(Tabbar);
Vue.use(TabbarItem);

export default {
    data() {
    return {
      active: 0,
       menu: [
        {
          id:1,
          name: "home",
          path: "/home",
          icon: "home-o",
          title: "首页",
        },
        {
          id:2,
          name: "list",
          path: "/list",
          icon: "apps-o",
          title: "分类",
        },
        {
          id:3,
          name:'message',
          path:'/message',
          icon:'chat-o',
          title:"消息"
        },
        {
          id:4,
          name: "cart",
          path: "/cart",
          icon: "shopping-cart-o",
          title: "购物车",
        },
        {
          id:5,
          name: "mine",
          path: "/mine",
          icon: "contact",
          title: "我的",
        },
      ],
    };
  },
}
</script>

<style lang="scss" scoped>
@import '../sass/appNav.scss';

</style>
